using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Ltf.Remoting.TeamFoundation;
// test comments
namespace Ltf.Remoting.RemoteEvents
{
	public class RemoteEventRaiser
	{
		public event LizardEventHandler OpenMonitorForm;
		public event LizardEventHandler DirDiff;
		public event LizardEventHandler MessageBox;

		public void RaiseOpenMonitorForm(object sender, LizardEventArgs args)
		{
	//		File.WriteAllText(ServerConnections.GetConnectionForPath(args.Paths[0]).Settings.TempPath + "\\RaiseOpenMonitorForm.txt", string.Format("Type:{0} Paths:{1}",args.FormType.ToString(),args.PathList ));
			OnOpenMonitorForm(sender, args);
		}

		public void RaiseMessageBox(object sender, LizardEventArgs args)
		{
			OnMessageBox(sender, args);
		}

		protected virtual void OnOpenMonitorForm(object sender, LizardEventArgs args)
		{
			if (OpenMonitorForm != null)
			{
//				File.WriteAllText(ServerConnections.GetConnectionForPath(args.Paths[0]).Settings.TempPath + "\\OnOpenMonitorForm.txt", string.Format("Type:{0} Paths:{1}", args.FormType.ToString(), args.PathList));

				OpenMonitorForm(sender, args);
			}
		}

		protected virtual void OnMessageBox(object sender, LizardEventArgs args)
		{
			if (MessageBox != null)
				MessageBox(sender, args);
		}


	}
}
